<template>
  <div>
    <div class="outcontainer">
      <svg width="700" height="250" class="text">
        <defs>
          <linearGradient id="geekColor" gradientTransform="rotate(90)">
            <stop offset="0%" stop-color="#000"></stop>
            <!-- //渐变动画 -->
            <animate
              attributeName="stop-color"
              values="#91bd3a;#12cad6;#91bd3a"
              dur="10s"
              begin="3s"
              repeatCount="indefinite"
            ></animate>
            <stop offset="100%" stop-color="#12cad6"></stop>
          </linearGradient>
        </defs>
        <text style="text-anchor: middle" class="logo_text" x="200" y="100">123</text>
        <text style="text-anchor: middle" class="logo_text" x="200" y="150">123</text>
      </svg>
    </div>
  </div>
</template>

<script setup lang="ts"></script>

<style lang="scss" scoped>
.outcontainer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.logo_text {
  font-size: 26px;
  fill: none;
  stroke: url(#geekColor);
  stroke-width: 1;
  stroke-dasharray: 10 280;
  stroke-dashoffset: 10;
  animation: drawing 4.3s linear 0s forwards;
}

p {
  font-weight: 200;
  font-size: 20px;
  line-height: 28px;

  button {
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    margin-left: 10px;
  }
}
@keyframes drawing {
  to {
    stroke-dasharray: 280;
    stroke-dashoffset: 0;
  }
}
</style>
